﻿using System.Collections.Generic;
using System.Linq;
using Neptuno.Model;

namespace Neptuno.Component
{
    public class LogsComponent : BaseComponent
    {
        public bool AgregarLog(Logs Log)
        {
            this.Context.Logs.AddObject(Log);
            return this.Context.TryToSave();
        }

        public List<Logs> Listar(string username)
        {
            return this.Context.Logs.Where(t => t.userName == username).ToList();
        }
    }
}
